package imper;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import de.matthiasmann.twl.Button;
import TWLSlick.BasicTWLGameState;
import TWLSlick.RootPane;

public class MainMenuState extends BasicTWLGameState
{
  private Button btn;

  @Override
  protected RootPane createRootPane()
  {
    rootPane = super.createRootPane();

    btn = new Button("Hello");
    //btn.setTheme("tttt");
    btn.addCallback(new Runnable()
    {
      public void run()
      {
        System.out.println("It works!");
      }
    });
    rootPane.add(btn);
    // rootPane
    return rootPane;
  }

  @Override
  protected void layoutRootPane()
  {
    btn.adjustSize();
    btn.setPosition(100, 100);
  }

  @Override
  public void init(GameContainer arg0, StateBasedGame arg1) throws SlickException
  {
    // TODO Auto-generated method stub

  }

  @Override
  public void render(GameContainer arg0, StateBasedGame arg1, Graphics arg2) throws SlickException
  {
    // TODO Auto-generated method stub

  }

  @Override
  public void update(GameContainer arg0, StateBasedGame arg1, int arg2) throws SlickException
  {
    // TODO Auto-generated method stub

  }

  @Override
  public int getID()
  {
    // TODO Auto-generated method stub
    return 0;
  }

}
